package cn.ds.assets.module.app.controller.admin.project;

import cn.ds.assets.framework.common.pojo.PageResult;
import cn.ds.assets.module.app.service.project.ProjectService;
import cn.ds.assets.framework.operatelog.core.annotations.OperateLog;
import cn.ds.assets.module.assets.dal.dataobject.project.BaseProjectDO;
import cn.ds.assets.module.assets.service.project.BaseProjectService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.security.PermitAll;

@Tag(name = "项目管理")
@RestController
@RequestMapping("/app/project")
@Validated
@Slf4j
public class ProjectController {

    @Autowired
    private ProjectService projectService;

    @GetMapping("/hello")
    @PermitAll
    @Operation(summary = "测试")
    @OperateLog(enable = false)
    public PageResult hello() {

        PageResult<BaseProjectDO> po = projectService.getPo(1L);
        log.info("测试!9999");

        return po;
    }

    @GetMapping("/hello2")
    @PermitAll
    @Operation(summary = "测试")
    @OperateLog(enable = false)
    public PageResult hello2() {

        PageResult<BaseProjectDO> po = projectService.getPo(1L);
        log.info("测试!222afeafewfwexxxx");

        return po;
    }
}
